package com.zrf.testchatgpt.mapper;

import com.zrf.testchatgpt.entity.Detail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.springframework.scheduling.annotation.Async;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zrf
 * @since 2023-03-15
 */
public interface DetailMapper extends BaseMapper<Detail> {
    @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
    @Insert("INSERT into detail(user_id,askquestion,answer_title,answer_content,create_time,is_delete) VALUES(#{userId},#{askquestion},#{answerTitle},#{answerContent},NOW(),#{isDelete})")
    public Integer insertDetail(Detail detail);
}
